async function get_info(urls) {
  return new Promise((resolve, reject) => {
    $.ajax({
      url: urls,
      type: 'get',
      data: {},
      async: true,
      success: function(data) {
        resolve(data);
      },
      error: function(xhr, status, error) {
        if (xhr.status === 401) {
          // 处理401错误
          reject(new Error('401 Unauthorized'));
        } else {
          reject(new Error('An error occurred: ' + error));
        }
      }
    });
  });
}

async function patch_info(urls,datas) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: urls,
            type: 'patch',
            data: $.param(datas),
            async: true,
            success: function(data) {
                resolve(data);
            }
        });
    });
}
async function post_info(urls,datas) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: urls,
            type: 'post',
            data: $.param(datas),
            async: true,
            success: function(data) {
                resolve(data);
            }
        });
    });
}
async function delete_info(urls,datas) {
    return new Promise((resolve, reject) => {
        $.ajax({
            url: urls,
            type: 'delete',
            data: $.param(datas),
            async: true,
            success: function(data) {
                resolve(data);
            }
        });
    });
}